package io;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;

/*
 * 字符流
 */
public class Test3 {

	public static void main(String[] args) {
		
		File f=new File("d:\\world.txt");
		try {
			FileReader fr=new FileReader(f);
			BufferedReader br=new BufferedReader(fr);
			String s;
			while((s=br.readLine())!=null){  //一行
				System.out.println(s);
			} 
			br.close();
			fr.close();
			
		} catch (Exception e) {
			e.printStackTrace();
		}
		

	}

}
